import Vue from 'vue'
import App from './App'
import Router from 'vue-router'
import VueResource from 'vue-resource'
import IndexView from './IndexView'
import store from './store'
/**
 * 类似于fetch
 */
Vue.use(VueResource);
Vue.use(Router);
/**
 * 注册过滤器
 */
Vue.filter('length-filter', function (value) {
  return value.substr(0, 5);
})
/**
 * 使用router
 */

const router = new Router({
  mode: 'hash',
  routes: [
    {path: '/', component: IndexView}
  ]
})

new Vue({
  el: '#app',
  store,
  router,
  render: h => h(App)
})
